<?xml version="1.0"?>
<component name="org.nuxeo.ecm.virtualnavigation.contentviews.contrib.override">

  <require>org.nuxeo.ecm.virtualnavigation.contentviews.contrib</require>

  <extension point="contentViews" target="org.nuxeo.ecm.platform.ui.web.ContentViewService">

    <contentView name="bySubjectsContentView">
      <title>label.virtualnavigation.subjects</title>
      <translateTitle>true</translateTitle>
      <showTitle>true</showTitle>
      <emptySentence>label.content.empty.search</emptySentence>
      <translateEmptySentence>true</translateEmptySentence>

      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <!-- search doc maintained here -->
        <whereClause docType="QueryNav">
          <predicate operator="STARTSWITH" parameter="dc:subjects">
            <field name="subjects" schema="querynav"/>
          </predicate>
          <fixedPart>
            ecm:mixinType != 'HiddenInNavigation' AND
            ecm:currentLifeCycleState
            !='deleted' AND ecm:isCheckedInVersion = 0
          </fixedPart>
        </whereClause>
        <sort ascending="true" column="dc:title"/>
        <pageSize>10</pageSize>
      </coreQueryPageProvider>

      <showPageSizeSelector>true</showPageSizeSelector>
      <useGlobalPageSize>true</useGlobalPageSize>
      <refresh>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>only_one_cache</cacheKey>
      <cacheSize>1</cacheSize>

      <resultLayouts>
        <layout iconPath="/icons/document_listing_icon.png" name="document_virtual_navigation_listing_ajax" showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" title="document_listing" translateTitle="true"/>
        <layout iconPath="/icons/document_listing_compact_2_columns_icon.png" name="document_virtual_navigation_listing_ajax_compact_2_columns" showSyndicationLinks="true" title="document_listing_compact_2_columns" translateTitle="true"/>
        <layout iconPath="/icons/document_listing_icon_2_columns_icon.png" name="document_virtual_navigation_listing_ajax_icon_2_columns" showSyndicationLinks="true" title="document_listing_icon_2_columns" translateTitle="true"/>
      </resultLayouts>

      <selectionList>CURRENT_SELECTION</selectionList>
      <actions category="CURRENT_SELECTION_LIST"/>

    </contentView>

    <contentView name="byCoverageContentView">
      <title>label.virtualnavigation.coverage</title>
      <translateTitle>true</translateTitle>
      <showTitle>true</showTitle>
      <emptySentence>label.content.empty.search</emptySentence>
      <translateEmptySentence>true</translateEmptySentence>

      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <!-- search doc maintained here -->
        <whereClause docType="QueryNav">
          <predicate operator="STARTSWITH" parameter="dc:coverage">
            <field name="coverage" schema="querynav"/>
          </predicate>
          <fixedPart>
            ecm:mixinType != 'HiddenInNavigation' AND
            ecm:currentLifeCycleState
            !='deleted' AND ecm:isCheckedInVersion = 0
          </fixedPart>
        </whereClause>
        <sort ascending="true" column="dc:title"/>
        <pageSize>10</pageSize>
      </coreQueryPageProvider>

      <showPageSizeSelector>true</showPageSizeSelector>
      <useGlobalPageSize>true</useGlobalPageSize>
      <refresh>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>only_one_cache</cacheKey>
      <cacheSize>1</cacheSize>

      <resultLayouts>
        <layout iconPath="/icons/document_listing_icon.png" name="document_virtual_navigation_listing_ajax" showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" title="document_listing" translateTitle="true"/>
        <layout iconPath="/icons/document_listing_compact_2_columns_icon.png" name="document_virtual_navigation_listing_ajax_compact_2_columns" showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" title="document_listing_compact_2_columns" translateTitle="true"/>
        <layout iconPath="/icons/document_listing_icon_2_columns_icon.png" name="document_virtual_navigation_listing_ajax_icon_2_columns" showCSVExport="true" showPDFExport="false" showSyndicationLinks="true" title="document_listing_icon_2_columns" translateTitle="true"/>
      </resultLayouts>

      <selectionList>CURRENT_SELECTION</selectionList>
      <actions category="CURRENT_SELECTION_LIST"/>

    </contentView>

  </extension>

</component>
